#include "SceneManager.h"

#include "GameScene.h"
#include "MenuScene.h"
#include "TitleScene.h"
#include "EndScene.h"

SceneManager::SceneManager(void)
	:nextName("")
{
	sceneMap["TitleScene"]=new TitleScene();
	sceneMap["MenuScene"]=new MenuScene();
	sceneMap["GameScene"]=new GameScene(1);
	sceneMap["EndScene"]=new EndScene();

	nowScene = sceneMap["TitleScene"];
}


SceneManager::~SceneManager(void)
{
	sceneMap.clear();
}

void SceneManager::changeScene()
{
	if( sceneMap.find(nextName) != sceneMap.end() )
	{
		nowScene = sceneMap[nextName];
		nextName = std::string("");
	}
}
